home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / futils / futils-2.0 / fu2-diff.zoo / src / src-diff < prev   
Encoding:
Text File  |  1991-06-15  |  8.1 KB  |  305 lines

  1. diff -c fileutils-2.0/src/cat.c fileutils-2.0-st/src/cat.c
  2. *** fileutils-2.0/src/cat.c    Thu Jun  6 12:54:07 1991
  3. --- fileutils-2.0-st/src/cat.c    Thu Jun 13 00:28:39 1991
  4. ***************
  5. *** 217,223 ****
  6. --- 217,227 ----
  7.   
  8.     /* Get device, i-node number, and optimal blocksize of output.  */
  9.   
  10. + #if !defined(atarist)                       /* (sjk)++ */
  11.     if (fstat (output_desc, &stat_buf) < 0)
  12. + #else
  13. +   if (stat ("CON:",&stat_buf) < 0)
  14. + #endif
  15.       error (1, errno, "standard output");
  16.   
  17.     outsize = ST_BLKSIZE (stat_buf);
  18. diff -c fileutils-2.0/src/cmp.c fileutils-2.0-st/src/cmp.c
  19. *** fileutils-2.0/src/cmp.c    Sun Jun  2 15:42:10 1991
  20. --- fileutils-2.0-st/src/cmp.c    Thu Jun 13 00:29:05 1991
  21. ***************
  22. *** 216,222 ****
  23. --- 216,226 ----
  24.           {
  25.             nulldev = sb.st_dev;
  26.             nullino = sb.st_ino;
  27. + #if !defined(atarist)                          /* (sjk)++  */
  28.             if (fstat (1, &sb) == 0
  29. + #else 
  30. +           if (stat ("CON:",&sb) == 0
  31. + #endif
  32.             && sb.st_dev == nulldev && sb.st_ino == nullino)
  33.           comparison_type = type_status;
  34.           }
  35. diff -c fileutils-2.0/src/cp.c fileutils-2.0-st/src/cp.c
  36. *** fileutils-2.0/src/cp.c    Mon Jun  3 16:55:32 1991
  37. --- fileutils-2.0-st/src/cp.c    Thu Jun 13 00:48:08 1991
  38. ***************
  39. *** 735,741 ****
  40. --- 735,745 ----
  41.       {
  42.         struct utimbuf utb;
  43.   
  44. + #if !defined(atarist)                           /* (sjk)++ */
  45.         utb.actime = src_sb.st_atime;
  46. + #else
  47. +       utb.axtime = src_sb.st_atime;
  48. + #endif 
  49.         utb.modtime = src_sb.st_mtime;
  50.   
  51.         if (utime (dst_path, &utb))
  52. ***************
  53. *** 946,952 ****
  54. --- 950,960 ----
  55.       {
  56.         struct utimbuf utb;
  57.   
  58. + #if !defined(atarist)                                 /* (sjk)++ */
  59.         utb.actime = src_sb.st_atime;
  60. + #else
  61. +       utb.axtime = src_sb.st_atime;
  62. + #endif
  63.         utb.modtime = src_sb.st_mtime;
  64.   
  65.         if (utime (dst_path, &utb))
  66. ***************
  67. *** 1093,1098 ****
  68. --- 1101,1111 ----
  69.         /* If the file has fewer blocks than would normally
  70.        be needed for a file of its size, then
  71.        at least one of the blocks in the file is a hole. */
  72. + #if defined(atarist) 
  73. + #define DEV_BSIZE 512
  74. + #endif
  75.         if (S_ISREG (sb.st_mode) &&
  76.         sb.st_size - (sb.st_blocks * DEV_BSIZE) >= DEV_BSIZE)
  77.       make_holes = 1;
  78. diff -c fileutils-2.0/src/install.c fileutils-2.0-st/src/install.c
  79. *** fileutils-2.0/src/install.c    Sun Jun  2 15:42:28 1991
  80. --- fileutils-2.0-st/src/install.c    Thu Jun 13 00:29:49 1991
  81. ***************
  82. *** 79,86 ****
  83. --- 79,88 ----
  84.   void endpwent ();
  85.   void endgrent ();
  86.   
  87. + #if !defined(atarist)                             /* (sjk)++ */
  88.   /* True if C is an ASCII octal digit. */
  89.   #define isodigit(c) ((c) >= '0' && c <= '7')
  90. + #endif 
  91.   
  92.   /* Number of bytes of a file to copy at a time. */
  93.   #define READ_SIZE (32 * 1024)
  94. ***************
  95. *** 375,382 ****
  96.         error (1, errno, "cannot fork");
  97.         break;
  98.       case 0:            /* Child. */
  99. !       execlp ("strip", "strip", path, (char *) NULL);
  100. !       error (1, errno, "cannot run strip");
  101.         break;
  102.       default:            /* Parent. */
  103.         /* Parent process. */
  104. --- 377,384 ----
  105.         error (1, errno, "cannot fork");
  106.         break;
  107.       case 0:            /* Child. */
  108. !       execl ((char *)getenv("STRIP"), "strip", path, (char *) NULL);
  109. !       error(1, errno, "cannot run strip");
  110.         break;
  111.       default:            /* Parent. */
  112.         /* Parent process. */
  113. ***************
  114. *** 394,399 ****
  115. --- 396,402 ----
  116.     struct passwd *pw;
  117.     struct group *gr;
  118.   
  119. + #if !defined(atarist)                                  /* (sjk)++ */
  120.     if (owner_name)
  121.       {
  122.         pw = getpwnam (owner_name);
  123. ***************
  124. *** 425,430 ****
  125. --- 428,435 ----
  126.       }
  127.     else
  128.       group_id = getgid ();
  129. + #endif 
  130.   }
  131.   
  132.   /* Return nonzero if STR is an ASCII representation of a nonzero
  133. diff -c fileutils-2.0/src/mv.c fileutils-2.0-st/src/mv.c
  134. *** fileutils-2.0/src/mv.c    Sun Jun  2 15:42:37 1991
  135. --- fileutils-2.0-st/src/mv.c    Thu Jun 13 00:49:02 1991
  136. ***************
  137. *** 403,409 ****
  138. --- 403,413 ----
  139.     {
  140.       struct utimbuf tv;
  141.   
  142. + #if !defined(atarist)                                  /* (sjk)++ */
  143.       tv.actime = from_stats.st_atime;
  144. + #else
  145. +     tv.axtime = from_stats.st_atime;
  146. + #endif
  147.       tv.modtime = from_stats.st_mtime;
  148.       if (utime (to, &tv))
  149.         {
  150. diff -c fileutils-2.0/src/system.h fileutils-2.0-st/src/system.h
  151. *** fileutils-2.0/src/system.h    Fri Jun  7 21:49:41 1991
  152. --- fileutils-2.0-st/src/system.h    Thu Jun 13 00:34:17 1991
  153. ***************
  154. *** 54,61 ****
  155. --- 54,63 ----
  156.   #include <unistd.h>
  157.   #include <limits.h>
  158.   #ifndef PATH_MAX
  159. + #if !defined(atarist)                               /* (sjk)++ */
  160.   #define PATH_MAX pathconf ("/", _PC_PATH_MAX)
  161.   #endif
  162. + #endif
  163.   #else
  164.   #ifdef USG
  165.   #include <sys/times.h>
  166. ***************
  167. *** 66,74 ****
  168. --- 68,79 ----
  169.   #endif
  170.   
  171.   #ifndef _POSIX_PATH_MAX
  172. + #if !defined(atarist)                               /* (sjk)++ */
  173.   #define _POSIX_PATH_MAX 255
  174.   #endif
  175. + #endif
  176.   
  177. + #if !defined(atarist)                               /* (sjk)++ */
  178.   #ifndef PATH_MAX
  179.   #ifdef MAXPATHLEN
  180.   #define PATH_MAX MAXPATHLEN
  181. ***************
  182. *** 76,85 ****
  183. --- 81,93 ----
  184.   #define PATH_MAX _POSIX_PATH_MAX
  185.   #endif
  186.   #endif
  187. + #endif
  188.   
  189.   #ifdef _POSIX_SOURCE
  190. + #if !defined(atarist)                              /* (sjk)++ */
  191.   #define major(dev)  (((dev) >> 8) & 0xff)
  192.   #define minor(dev)  ((dev) & 0xff)
  193. + #endif
  194.   #define makedev(maj, min)  (((maj) << 8) | (min))
  195.   #else
  196.   #ifdef USG
  197. ***************
  198. *** 90,95 ****
  199. --- 98,104 ----
  200.   #ifdef POSIX
  201.   #include <utime.h>
  202.   #else
  203. + #if !defined(atarist)                                /* (sjk)++ */
  204.   struct utimbuf
  205.   {
  206.     long actime;
  207. ***************
  208. *** 96,101 ****
  209. --- 105,111 ----
  210.     long modtime;
  211.   };
  212.   #endif
  213. + #endif
  214.   
  215.   #if defined(USG) || defined(STDC_HEADERS)
  216.   #include <string.h>
  217. ***************
  218. *** 107,113 ****
  219.   #include <strings.h>
  220.   #endif
  221.   
  222. ! #if defined(USG) || defined(POSIX)
  223.   #ifndef F_OK
  224.   /* Args for access. */
  225.   #define F_OK 0
  226. --- 117,123 ----
  227.   #include <strings.h>
  228.   #endif
  229.   
  230. ! #if defined(USG) || defined(POSIX) || defined(atarist)      /* (sjk)++ */
  231.   #ifndef F_OK
  232.   /* Args for access. */
  233.   #define F_OK 0
  234. ***************
  235. *** 155,161 ****
  236.      ST_BLKSIZE: Optimal I/O blocksize for the file, in bytes.
  237.      ST_NBLOCKS: Number of 512-byte blocks in the file
  238.      (including indirect blocks). */
  239. ! #ifdef _POSIX_SOURCE
  240.   #define ST_BLKSIZE(statbuf) 512
  241.   #define ST_NBLOCKS(statbuf) (((statbuf).st_size + 512 - 1) / 512)
  242.   #else
  243. --- 165,171 ----
  244.      ST_BLKSIZE: Optimal I/O blocksize for the file, in bytes.
  245.      ST_NBLOCKS: Number of 512-byte blocks in the file
  246.      (including indirect blocks). */
  247. ! #if defined(_POSIX_SOURCE) || defined(atarist)             /* (sjk)++ */
  248.   #define ST_BLKSIZE(statbuf) 512
  249.   #define ST_NBLOCKS(statbuf) (((statbuf).st_size + 512 - 1) / 512)
  250.   #else
  251. diff -c fileutils-2.0/src/tac.c fileutils-2.0-st/src/tac.c
  252. *** fileutils-2.0/src/tac.c    Sun Jun  2 15:42:51 1991
  253. --- fileutils-2.0-st/src/tac.c    Thu Jun 13 00:34:36 1991
  254. ***************
  255. *** 221,227 ****
  256. --- 221,231 ----
  257.        Use fstat instead of checking for errno == ESPIPE because
  258.        lseek doesn't work on some special files but doesn't return an
  259.        error, either. */
  260. + #if !defined(atarist)                                /* (sjk)++ */
  261.     if (fstat (0, &stats))
  262. + #else 
  263. +   if (stat("CON:",&stats))
  264. + #endif
  265.       {
  266.         error (0, errno, "standard input");
  267.         return 1;
  268. diff -c fileutils-2.0/src/touch.c fileutils-2.0-st/src/touch.c
  269. *** fileutils-2.0/src/touch.c    Sun Jun  9 01:34:13 1991
  270. --- fileutils-2.0-st/src/touch.c    Thu Jun 13 00:51:49 1991
  271. ***************
  272. *** 285,298 ****
  273. --- 285,312 ----
  274.   
  275.         if (use_ref)
  276.       {
  277. + #if !defined(atarist)                            /* (sjk)++ */
  278.         utb.actime = ref_stats.st_atime;
  279. + #else
  280. +       utb.axtime = ref_stats.st_atime;
  281. + #endif
  282.         utb.modtime = ref_stats.st_mtime;
  283.       }
  284.         else
  285. + #if !defined(atarist)
  286.       utb.actime = utb.modtime = newtime;
  287. + #else
  288. +     utb.axtime = utb.modtime = newtime;
  289. + #endif
  290.   
  291.         if (!(change_times & CH_ATIME))
  292. + #if !defined(atarist)                            /* (sjk)++ */
  293.       utb.actime = sbuf.st_atime;
  294. + #else
  295. +     utb.axtime = sbuf.st_atime;
  296. + #endif
  297.   
  298.         if (!(change_times & CH_MTIME))
  299.       utb.modtime = sbuf.st_mtime;
  300.